<template>
    <!-- 你好 世界 -->
    <div class='fixed-bottom'>
        <el-row>
            <el-col :span='5'>
                <div class='menu' @click='openLeft'></div>
            </el-col>
            <el-col :span='5'>
                <div class='notice' @click='openQr'></div>
            </el-col>
            <el-col :span='5'>
                <div class='icon fa fa-home'  @click='goIndex'></div>
            </el-col>
            <el-col :span='9'>
                <div class='icon shopping-car car' @click='car'>
                    &nbsp;&nbsp;{{handleMoney(price)}}
                </div>
            </el-col>
        </el-row>
    </div>
</template>
<script>
import {_money,CAR_COUNT} from '@/comm.js';

export default {
  data(){
    return ({
      
    });
  },
  props:{
        price:{
            default:0
        }
    },
  methods:{
    openLeft(){
        this.$emit('openLeft');
    },
    openQr(){
        this.$emit('openQr');
    },
    car(){
        this.$router.push({path:'/orderList'});
        return;
        $.get(CAR_COUNT,(data)=>{
            // data.data?this.$emit('car'):;
        });
        
    },
    goIndex(){
        this.$router.push({path:'/home'});
        this.$emit('goIndex');
    },
    handleMoney(money){
        return _money(money);
    }
  },
}
</script>
<style scoped>
    .fixed-bottom{
        position: fixed;
        width: 100%;
        height: 50px;
        bottom:0;
        background: #183242;
    }
    .fixed-bottom .icon{
        width: 100%;
        height:100%;
        font-size:20px;
        line-height: 50px;
        text-align: center;
        color:white;
    }
    .fixed-bottom .shopping-car{
        background: #fa6913;
    }
    .menu{
        width: 100%;
        height: 50px;
        background: url('../../static/img/menu-icon.png') no-repeat center center;
        background-size: 22px 30px;
    }
    .notice{
        width: 100%;
        height: 50px;
        background: url('../../static/img/msg-icon.png') no-repeat center center;
        background-size: 22px 30px;
    }
    .car{
        width: 100%;
        height: 50px;
        background: url('../../static/img/car-icon.png') no-repeat 16px center;
        background-size: 26px 26px;
    }
</style>
